1. Field of Invention
The present invention relates to a floppy disk emulator and, more particularly, to a floppy disk emulator using flash memory.
2. Description of Related Art
Memory cards have begun to challenge floppy disks as an alternative for storing data and programs for a computer. One form of memory card used to replace a floppy disk is based on flash EPROMs, which offer the stability of non-volatile solid state memory in a form of removable media, needing no power source to sustain the memory. Looking like thick credit cards, flash EPROM cards, also called flash EPROM memory modules, are made of a number of flash EPROM chips in a plastic package.
The most obvious advantages flash EPROM cards have over floppy disks are size and weight. Floppy disks, of whatever size, require a disk drive which adds weight and bulk. Rather than having an actuator arm and recording head for reading and writing information, flash EPROM memory cards use a simple connector, which is more reliable and has a longer life span. Thus, compared with disk drives, flash EPROM memory products offer increased reliability, smaller size and lower weight.
Today, a personal computer's hard disk drive is one of its most power hungry components. A battery operated portable computer supplies a limited amount of power, and hard disk drives use up that power quickly. Most portable computers today require fairly sophisticated power management facilities to extend the amount of time the machine can be used.
A portable computer's power management facility often turns off the hard disk if it is not being used. While this may extend a portable computer's limited battery life, it lowers performance. When the power comes back on, the disk drive's motor can take several seconds to bring it up to speed before disk I/O can begin. A flash based disk needs no warmup. When power is turned on, the data is immediately available. With no waiting, there is no loss in performance. In addition to achieving power savings from an "instant on" flash EPROM memory, there are savings from not having to operate power hungry motors and servos.
Engineers designing new computers can design those computers to be used specifically with flash EPROM memory cards rather than floppy disks. An alternative, however, is to design a flash EPROM drive that emulates a floppy disk drive and floppy disk. Thus, a computer designed to operate with a floppy disk, containing a floppy disk controller, can be used with a flash EPROM memory card device designed to emulate a floppy disk drive and floppy disk. This alternative is preferred because of the multitude of computer users who currently own computers designed to use floppy disks.
Although flash EPROM cards offer many advantages over floppy disks, there are still some problems. A flash EPROM chip may contain thousands of memory cells. A user may write to any individual cell by addressing that particular cell. However, a user may not erase an individual cell. The entire flash EPROM chip must be erased as a whole. Thus, if a given flash EPROM chip in a flash EPROM card is filled with thousands of bytes of data and the user wishes to erase one of those bytes, the user must erase the entire chip. One technique for addressing this problem is to not erase that one byte of data but, rather, rewrite the byte of data somewhere else. However, this solution does not completely solve the problem. Eventually the chip will be filled up and bytes will have to be erased. In addition, it is inefficient use or the memory. Thus, the first problem to solve is how to organize the information on the EPROM to maximize space available for writing. This problem includes managing where to write data to and how to erase flash EPROMs on a flash EPROM card.
A second problem relates to tinning when emulating a floppy disk with a flash EPROM card. The time necessary to write data to a flash EPROM is slower than the time necessary to write data to a floppy disk. When a flash EPROM card is being used to emulate a floppy disk, the floppy disk controller is operating under the assumption that it is writing to a floppy disk; therefore, the floppy disk controller has a tinning protocol significantly faster than can be achieved by the flash EPROM.
A third problem also relates to the time necessary to write to a flash EPROM. Because writing to a flash EPROM takes longer than a floppy disk, the chance of power being terminated during a write process is greater with a flash EPROM card than with a floppy disk. Thus, the designer of a flash EPROM device emulating a floppy disk must take into account errors in data integrity because of the possibility of a power outage during a write operation.
Therefore, it is desirable to provide an apparatus for transferring data between the floppy disk controller of a host computer and the flash EPROM card where that apparatus enables the flash EPROM to emulate a floppy disk such that the timing differences between writing to a floppy disk and a flash EPROM are compensated for, a power outage during a write process is provided for, and data organization on the flash EPROM card is managed such that available space on the card is used efficiently.